package xin.baizhiedu.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 *  大屏全部工单
 *  SELECT
 * 	COUNT( CASE WHEN a.STUT_STATECODE IN ( 'PLAN.t_plan_Job.STUT_StateCode.001', 'PLAN.t_plan_Job.STUT_StateCode.002', 'PLAN.t_plan_Job.STUT_StateCode.003', 'PLAN.t_plan_Job.STUT_StateCode.014', 'PLAN.t_plan_Job.STUT_StateCode.006' ) THEN 1 END ) AS KEEPING_JOB,
 * 	COUNT( CASE WHEN a.STUT_STATECODE = 'PLAN.t_plan_Job.STUT_StateCode.018' AND TRUNC( a.JOB_ACTUALENDTIME ) = TRUNC( SYSDATE ) THEN 1 END ) AS END_JOB,
 * 	SUM( CASE WHEN TRUNC( b.JOB_ACTUALENDTIME ) = TRUNC( SYSDATE ) THEN b.JOB_REPAIRNUMS ELSE 0 END ) AS COUNT_REPAIRNUM,
 * 	COUNT( CASE WHEN TRUNC( b.JOB_ACTUALENDTIME ) = TRUNC( SYSDATE ) THEN b.JOB_REPAIRNUMS END ) AS COUNT_REPAIRJOB ,
 * 	COUNT( CASE WHEN a.STUT_STATECODE = 'PLAN.t_plan_Job.STUT_StateCode.018' THEN 1 END ) AS WAN_JOB
 * FROM
 * 	T_PLAN_JOB a
 * 	LEFT JOIN (
 * 	SELECT
 * 		JOB_PID,
 * 		SUM( JOB_REPAIRNUM ) AS JOB_REPAIRNUMS,
 * 		JOB_ACTUALENDTIME
 * 	FROM
 * 		T_PLAN_JOB
 * 	WHERE
 * 		JOB_TYPENAME != '订单'
 * 		AND JOB_REPAIRNUM > 0
 * 	GROUP BY
 * 		JOB_PID,
 * 		JOB_ACTUALENDTIME
 * 	) b ON a.JOB_ID = b.JOB_PID
 * WHERE
 * 	a.JOB_DIVISION = '1'
 * 	AND a.JOB_TYPE = 'PLAN.t_plan_Job.Job_Type.002'
 */
@Data
@TableName(value = "QG_JOB_WORKING", autoResultMap = true)
public class qgJobWorking implements Serializable {

    private static final long serialVersionUID = 1L;
    /**
     * 加工工单数
     */
    @TableField(value = "KEEPING_JOB")
    private String keepingJob;
    /**
     *干完工单数
     */
    @TableField(value = "END_JOB")
    private String endJob;
    /**
     *有返修工单
     */
    @TableField(value = "COUNT_REPAIRJOB")
    private String countRepairJob;
    /**
     *返修次数
     */
    @TableField(value = "COUNT_REPAIRNUM")
    private String countRepairNum;
    /**
     *返修次数
     */
    @TableField(value = "WAN_JOB")
    private String wanJob;



}



